home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr46 / angel19b.zip / ANGELIB.TXT < prev    next >
Text File  |  1993-06-26  |  107KB  |  3,367 lines

  1.                                     ANGELIB for BC7/PDS                        i                                    ___________________
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                 _|||||_  ||_  ||  _|||||_  |||||||  ||       ||  |||||||
  8.                 ||   ||  |||_ ||  ||   ||  ||       ||       ||  ||    ||
  9.                 ||   ||  ||||_||  ||       ||       ||       ||  ||    ||
  10.                 |||||||  || ||||  || ||||  |||||    ||       ||  |||||||
  11.                 ||   ||  || ||||  ||   ||  ||       ||       ||  ||    ||
  12.                 ||   ||  ||  |||  ||   ||  ||       ||       ||  ||    ||
  13.                 ||   ||  ||   ||   |||||   |||||||  |||||||  ||  |||||||
  14.  
  15.  
  16.  
  17.                                          CONTENTS
  18.  
  19.  
  20.  
  21.           I.    DISCLAIMER OF WARRANTY  . . . . . . . . . . . . . . . . . .    1
  22.  
  23.           II.   COPYRIGHT . . . . . . . . . . . . . . . . . . . . . . . . .    1
  24.  
  25.           III.  LICENSE . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  26.  
  27.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME) . . . . . . . . . . . .    2
  28.                 Official Distribution Bulletin Boards . . . . . . . . . . .    2
  29.  
  30.           V.    INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . .    2
  31.  
  32.           VI.   SUMMARY OF RECENT UPDATES (WHAT'S NEW)  . . . . . . . . . .    3
  33.  
  34.           VII.  REGISTRATION  . . . . . . . . . . . . . . . . . . . . . . .    4
  35.                 A. Methods of Payment . . . . . . . . . . . . . . . . . . .    5
  36.                 B. Pricing  . . . . . . . . . . . . . . . . . . . . . . . .    5
  37.                 INVOICE & REGISTRATION  . . . . . . . . . . . . . . . . . .    9
  38.  
  39.           VIII. SYSTEM REQUIREMENTS . . . . . . . . . . . . . . . . . . . .   10
  40.  
  41.           IX.   FILES WHICH MAKE UP ANGELIB . . . . . . . . . . . . . . . .   10
  42.  
  43.           X.    USING ANGELIB . . . . . . . . . . . . . . . . . . . . . . .   11
  44.                 Creating a QLB (Quick Library)  . . . . . . . . . . . . . .   11
  45.  
  46.           XI.   REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . .   12
  47.  
  48.           XII.  USING PRINTER FUNCTIONS . . . . . . . . . . . . . . . . . .   48
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                     ANGELIB for BC7/PDS                        1                                    ___________________
  68.  
  69.  
  70.  
  71.  
  72.           I.    DISCLAIMER OF WARRANTY
  73.  
  74.                 I use the routines in ANGELIB almost every day as I write                                      _______
  75.           software and I am regularly adding, enhancing, or fixing.  My software
  76.           will never be "done," and I hope that it gets better and better.  In
  77.           any case, I can't guarantee that it's perfect; in fact, I'll guarantee
  78.           that it's not.  By using this software and documentation ("ANGELIB")
  79.           you must accept this disclaimer of warranty:
  80.  
  81.                 ANGELIB is provided "as is" without any warranties or                _______
  82.           conditions, expressed or implied, including, but not limited to, those
  83.           concerning merchantability and fitness for a particular purpose.  By
  84.           using ANGELIB, you are expressly releasing the author, Angel Babudro,                _______
  85.           from any liability resulting from the use of this software and
  86.           documentation.  You must assume the entire risk of using ANGELIB.                                                                   _______
  87.  
  88.  
  89.           II.   COPYRIGHT
  90.  
  91.                 The author retains the copyright for all ANGELIB source code,                                                         _______
  92.           documentation, assorted files, and all libraries.  However, once
  93.           provided with registration from the author you may distribute any
  94.           program you write with the benefit of ANGELIB, in compiled form only,                                                _______
  95.           without royalties to the author.  You must have written consent from
  96.           the author prior to distributing ANGELIB source code in part or in                                           _______
  97.           whole, whether modified or in original form.
  98.  
  99.  
  100.           III.  LICENSE
  101.  
  102.                 1.  ANGELIB is being distributed as Shareware.  This library is                    _______
  103.           not free, although license is hereby granted for evaluation of the
  104.           Unregistered Edition for an unlimited time.
  105.  
  106.                 2. You may keep as many backup copies of ANGELIB as you wish.                                                          _______
  107.           The Registered Edition is limited to simultaneous use on the number of
  108.           computers indicated by your registration level.  The Unregistered
  109.           Edition may be used on any number of computers.  You may share ANGELIB                                                                         _______
  110.           with others in complete and unmodified form.  REGISTERED USERS may NOT
  111.           distribute the files ending in OBJ.
  112.  
  113.                 3. You MUST NOT charge any fee or receive any consideration for
  114.           distributing the ANGELIB files and you MUST NOT include ANGELIB with
  115.           another business transaction (e.g., a hardware sale) unless you have
  116.           express written consent from the copyright holder, Angel Babudro.  You
  117.           MAY charge a fee of not more than US$6 (six dollars) for the disk
  118.           and/or service of distribution.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.                                     ANGELIB for BC7/PDS                        2                                    ___________________
  134.  
  135.  
  136.  
  137.  
  138.           IV.   TECHNICAL SUPPORT (HOW TO REACH ME)
  139.  
  140.                 If my wording is unclear or can't find some topic in here, give
  141.           me a holler and help me fix it or add it to the manual.  A letter or
  142.           BBS message is preferred (and less expensive for you).  Phone calls
  143.           are fine between 9am and 5pm Eastern Time as long as you are a
  144.           registered user or intend to become one.  I thank you for your help in
  145.           making this library better.
  146.  
  147.                 Sysops please read SYSOP.DOC for special deals.  Shareware
  148.           vendors please see VENDOR.DOC for distribution information.
  149.  
  150.                 I can be reached via the mail or BBS.  The bulletin boards below
  151.           should always have current versions of all my software and I will get
  152.           any messages left there for me.
  153.  
  154.                 Mail        Angel Babudro, "Organic Computer Wizardry",
  155.                             28 Mulberry Street, Clinton, NY  13323-1506,
  156.                             (315) 853-1070 Mon-Fri 9am-5pm Eastern Time
  157.  
  158.                 Official Distribution Bulletin Boards
  159.  
  160.                 On bulletin boards I use the first name "Angelo" since it avoids
  161.           gender confusion.  I go by either name, anyhow.
  162.  
  163.           East Coast        Excalibur, Central NY (315) 736-3792 USR 14.4
  164.                             This is my local distribution board where you can
  165.                             always find the latest updates to all of my
  166.                             software.  I will get messages left here within a
  167.                             few days.  My software can be FREQed from this board
  168.                             via RBBS Net address A:954/401, FIDO Net address
  169.                             1:26501, or ICN Net 91:315/101.
  170.  
  171.           West Coast        Researcher's BBS, So Cal (805) 949-8151 USR DS
  172.                             This is my west coast distribution board which is
  173.                             updated every 2-3 weeks with the latest versions of
  174.                             all my software.  Leave messages for me in
  175.                             conference #136 (Organic Software).
  176.  
  177.                 My software can also be found on many of the nations larger
  178.           bulletin boards, such as Exec-PC and Channel 1.
  179.  
  180.  
  181.           V.    INTRODUCTION
  182.  
  183.                 ANGEL.QLB is a "high level" BC7 library for developing business
  184.           applications, especially data base uses.  These are the routines I use
  185.           in developing my apps (with some help from three other shareware
  186.           libraries, most notably John Strong's EZ-Windows which is terrific).
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                                     ANGELIB for BC7/PDS                        3                                    ___________________
  200.  
  201.  
  202.  
  203.  
  204.                 I put in the things that are simple but a pain to code every
  205.           time, like a "percent completed" bar graph in a window, and things
  206.           that are more complicated, such as a scrollable information window
  207.           with mouse support.  ANGELIB is written in BASIC.  Even though it's                               _______
  208.           not the "tightest" code of its kind I think you will find it very easy
  209.           to use.
  210.  
  211.                 Some of my routines trade flexibility for ease of use, like the
  212.           percentage graph which is always the same colour and at the same spot
  213.           on the screen.  This keeps things simple and provides built-in
  214.           consistency.  Just in case my ideas for standards aren't the same as
  215.           yours :) I have decided to offer the licensing of my source code.
  216.  
  217.                 Well, what more can I say?  I hope my library helps you to write
  218.           a bit better and faster.  If so maybe I'll see your registration in my
  219.           mail someday.
  220.  
  221.  
  222.           VI.   SUMMARY OF RECENT UPDATES (WHAT'S NEW)
  223.  
  224.                 Every release fixes bugs found in previous releases and/or adds
  225.           a few new features.  Here is a summary of recent updates:
  226.  
  227.           1.9b  Routines updated: ChooseFile$, ChooseFiles$, GetFileName$,
  228.                 GetFileNames$, GetValidPath, IsPath%, ParseFSpec, StripSymbols$
  229.  
  230.                 Routines dropped: DBFPickFld, DBFShowFlds
  231.  
  232.                 Parameters modified: PctDone, ZipFmt$
  233.  
  234.                 FileRestore2%() has been renamed FileRestores%() to be
  235.                 consistent with other routines.
  236.  
  237.           1.9a  Parameters modified:  GetValidPath$, IsPath%
  238.  
  239.           1.9   Full LIB file is now included.  I was severly chastised by the
  240.                 dBASIC Toolkit BBS' sysop for distributing "crippled" software. 
  241.                 I never saw it that way before and am in agreement.  Now you can
  242.                 compile to EXE form, but if you want to distribute and/or sell
  243.                 your software please register the library.
  244.  
  245.           1.8m  All printer & font routines have been updated to allow use on
  246.                 networks using DOS SHARE.
  247.  
  248.           1.8j  StrFmt's parameters were in reverse order compared with other
  249.                 similar functions.  Mask & source strings have been swapped.
  250.  
  251.                 Parameters modified: HelpIndex
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.                                     ANGELIB for BC7/PDS                        4                                    ___________________
  266.  
  267.  
  268.  
  269.  
  270.                 Routines dropped: BackupMethod%, ChooseCountry%
  271.  
  272.                 Documentation corrected: I forgot to update the documentation
  273.                     for some routines.  Now you can actually use InputDate,
  274.                     FileBackup%, FileRestore%, FileRestores%, FmtFDD%
  275.  
  276.           1.8h  New routines:
  277.                 ChooseFiles$ allows multiple file names to be chosen (whereas
  278.                     ChooseFile$ allows only one).
  279.                 FileRestores% allows single or multiple files to be selected
  280.                     from a back-up copy.
  281.                 GetFileNames$ allows more than one input file to be selected.
  282.                 OutDevs$ is identical to OutDev$ but is for use with these other
  283.                     new routines (which all use a common routine from John
  284.                     Strong's EZ-Windows library).
  285.                 GetFileDesc$ retrieves a file's long name from the DESCRIPT.*
  286.                     file
  287.  
  288.                 Renamed ToFDD% to FileBackup% and FromFDD% to FileRestore% - I
  289.                 think these names are easier to remember.
  290.  
  291.  
  292.           VII.  REGISTRATION
  293.  
  294.                 Although I hope that you are so happy with ANGELIB that                                                           _______
  295.           registering will be reward enough in itself, but I think it's more fun
  296.           & exciting to get something new.  ANGELIB is the library I use for                                            _______
  297.           developing all of my applications, so it is constantly updated.  Your
  298.           registered version will be an up-to-the-minute copy.  Other benefits
  299.           of registration that come to my mind include:
  300.  
  301.                 1.  You'll get OBJ files so you can create your own custom
  302.                     libraries.  I use the EZ-Windows and PBClone libraries for
  303.                     some routines (why re-invent the wheel?), so you will need
  304.                     to get them if you want to create custom libraries.  Buying
  305.                     all three libraries will cost around $70 which is far less
  306.                     than most commercial packages.
  307.                 2.  Within days you will get a library that would probably take
  308.                     so long to develop yourself that by the time you've done it
  309.                     you won't need it anymore
  310.                 3.  You can order a printed & bound manual for $8
  311.                 4.  Technical support is possible! You can contact a real
  312.                     programmer who is 98% knowledgeable about the library
  313.                     (nobody's prefect) via mail, phone, or BBS
  314.                 5.  You'll have helped one of the little guys - someone who
  315.                     isn't a huge corporation.  (Thank you...)
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.                                     ANGELIB for BC7/PDS                        5                                    ___________________
  332.  
  333.  
  334.  
  335.  
  336.                 A.  Methods of Payment
  337.  
  338.                 U.S. customers please send cash, check, or money order. 
  339.           Canadian customers please send cash or Canadian International Money
  340.           Order (CIMO).  Customers in other countries please send U.S. funds
  341.           drawn on a U.S. bank.  If you send cash use a "security" no-see-
  342.           through envelope and you may want to send it via Registered mail, too.
  343.  
  344.                 If you prefer to use a credit card, you can order ANGELIB from                                                                  _______
  345.           Public (software) Library with your MC, Visa, AmEx, or Discover card
  346.           by calling 800-242-4PsL (from overseas: 713-524-6394) or by FAX to
  347.           713-524-6398 or by CompuServe to 71355,470.  THESE NUMBERS ARE FOR
  348.           ORDERING ONLY.  I CANNOT be reached at those numbers.  To contact me
  349.           for information about dealer pricing, volume discounts, site
  350.           licensing, the status of shipment of the product, the latest version
  351.           number, or for technical information, call 315-852-6942 or write me at
  352.           28 Mulberry Street, Clinton, NY USA 13323-1506.  Shareware is "try
  353.           before you buy" so please understand that product returns are not
  354.           allowed.
  355.  
  356.                 When ordering from PsL ask for product #10799 and please note
  357.           that PsL will add $3 for shipping & handling to U.S. as well as
  358.           Canadian orders.
  359.  
  360.                 B. Pricing
  361.  
  362.           Registration with Disk -- A single copy costs $29.  You will receive
  363.                 the latest version of ANGELIB in LIB (so it can be merged with                                      _______
  364.                 other libraries) and OBJ (to make custom libraries) formats. 
  365.                 You will also receive notification of major updates.  At this
  366.                 time, updates for registered users are $5 or send me a disk and
  367.                 return postage (I'll re-use your envelope).  See below for
  368.                 printed manuals.
  369.  
  370.           Multiple Copies -- Each copy may be used on a single computer at a
  371.                 time.  To ease the financial burden and thank you for being
  372.                 honest, you may apply the following discounts when ordering more
  373.                 than one copy:
  374.                 2 to 5 copies                                       40% discount
  375.                 Over 5 copies                                       50% discount
  376.  
  377.           Site License -- Register a single copy of ANGELIB and purchase a site                                                    _______
  378.                 license which allows you to make copies of the registered
  379.                 version for use on more than one computer owned by the same
  380.                 business.  I would prefer that you order a registered copy and
  381.                 Site License for each physical location of the same business,
  382.                 but this is not required unless you would like to receive update
  383.                 notices at each location.
  384.                    Up to 4 computers                             $30.00 per site
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                                     ANGELIB for BC7/PDS                        6                                    ___________________
  398.  
  399.  
  400.  
  401.  
  402.                    Up to 10 computers                            $70.00 per site
  403.                    Up to 20 computers                           $125.00 per site
  404.                    Any number of computers                      $400.00 per site
  405.  
  406.           Manuals -- I will print the latest version of the manual you are
  407.                 reading right now (using Ventura Publisher and a laser printer)
  408.                 and bind it.  I am offering this as a service to those who want
  409.                 a printed, bound manual with their software.  Most of the cost
  410.                 involved here is for materials and extra shipping costs. 
  411.                 Remember that ASCII and WP documentation files are always on
  412.                 disk and if you provide your printer model on the registration
  413.                 form I will send you a file ready to print on your printer.
  414.                 -  One copy                                                $8.00
  415.                 -  Two or more copies                             $6.00 per copy
  416.  
  417.           Source Code License - You may license the use of the source code for
  418.                 ANGELIB for just $30.  Thereafter, updates will be available for                _______
  419.                 $5 plus shipping.  Please note that I call routines from EZ-
  420.                 Windows (by John Strong) and PBClone (by Tom Hanlin) in my
  421.                 library (why re-invent their wheels?), so you will need to
  422.                 register one or both of these to use some OBJs in creating
  423.                 custom libraries.  I recommend both of them highly and will
  424.                 gladly share unregistered versions of these with you - just ask.
  425.  
  426.           Complimentary Registered Editions - I would like to give you a
  427.                 complimentary registration if you will give me a bit of
  428.                 marketing assistance:
  429.  
  430.                 1. Write a review of my software and post it on a bulletin
  431.                    board, send me a copy of it showing the BBS's header and the
  432.                    name and phone number of the BBS.  Just give me your honest
  433.                    praise and criticism in a decent review.  Your review will be
  434.                    most helpful to me if it mentions your best & worst-liked
  435.                    features and any ideas you have for improvement.  This will
  436.                    help me decide the future of ANGELIB and for that help I will                                                _______
  437.                    send you a complimentary registered disk.
  438.  
  439.                 2. It helps me to know which BBSs carry my software and the more
  440.                    the better, of course!  If you will upload a package to at
  441.                    least five public ("open") BBSs, send me their names and
  442.                    phone numbers and I'll send you a complimentary registered
  443.                    disk.  I would appreciate you uploading to time-share
  444.                    systems, private ("closed") BBSs, or part-time BBS, but
  445.                    please do not use these to apply for a complimentary
  446.                    registered edition.  BTW: I use an HST 14.4 modem so it would
  447.                    be best if you provided me with BBSs which also use HSTs so I
  448.                    can hook-up at high speed.
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.                                     ANGELIB for BC7/PDS                        7                                    ___________________
  464.  
  465.  
  466.  
  467.  
  468.                 3. If you are a consultant or other type of computer
  469.                    professional and your recommendation leads to one or more of
  470.                    your clients purchasing one of my packages, just send me a
  471.                    note with your client's registration or have them mention
  472.                    your name when they register.  I will send a complimentary
  473.                    registered edition or an update for every registration you
  474.                    get for me.  This is in lieu of a multiple copy discount; I
  475.                    intend it for consultants who choose not to deal with sales
  476.                    tax.
  477.  
  478.                 One complimentary registration per person or company.  A
  479.           complimentary registration is just like a paid one - you can upgrade
  480.           it with a site license, purchase manuals, etc.  It helps when you send
  481.           back disks to be re-used - even the envelopes can be re-used.  When
  482.           you order a complimentary registration please fill in the appropriate
  483.           blanks below PLUS the Invoice so I know what size disk you need, and
  484.           please send me a couple of dollar bills for shipping expenses. 
  485.           Thanks.
  486.  
  487.                 I will promise these complimentary offers until at least
  488.           12/31/93 - after that date please check with me first.
  489.  
  490.  
  491.  
  492.                           COMPLIMENTARY REGISTRATION APPLICATION
  493.                                   Use until Dec. 31, 1993
  494.  
  495.  
  496.                                                              Date_______________
  497.  
  498.                 Please also fill in the Invoice on the following page (put $0
  499.           for the disk).  Include $2.00 for shipping within the U.S. or the
  500.           amount indicated for addresses outside the U.S.  Remember to order
  501.           printed manual(s) if you so desire.
  502.  
  503.  
  504.           (__) Review posted on (BBS name & number)________________________
  505.                 Include a copy of the review, please. Thank you very much!
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                                     ANGELIB for BC7/PDS                        8                                    ___________________
  530.  
  531.  
  532.  
  533.  
  534.           (__) I uploaded (archive name, like ANGEL18E.ARJ)__________________
  535.                 to these five 24-hour public ("open") BBSs:
  536.  
  537.              BBS Name              Phone Number/Modem Type  Sysop Name             ________              _______________________  __________
  538.  
  539.           1_______________________ ________________________ _______________
  540.           2_______________________ ________________________ _______________
  541.           3_______________________ ________________________ _______________
  542.           4_______________________ ________________________ _______________
  543.           5_______________________ ________________________ _______________
  544.  
  545.              These offers subject to withdrawal or change at any time without
  546.           notice.  All prices are subject to change without notice.  Bulletin
  547.           Board Sysops please see the file SYSOP.DOC for special pricing and
  548.           information; vendors & sysops please see VENDOR.DOC.
  549.  
  550.                         Angel Babudro - "Organic Computer Wizardry"
  551.                         28 Mulberry Street   Clinton, NY 13323-1506
  552.                         (315) 853-6942 Mon-Fri 9am-5pm Eastern Time
  553.                (home phone; remember we're 3 hours later than Pacific coast)
  554.  
  555.                           Please register the Shareware you keep.
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.                                     ANGELIB for BC7/PDS                        9                                    ___________________
  596.  
  597.  
  598.  
  599.  
  600.                                                           INVOICE & REGISTRATION
  601.                                Credit card orders see "Methods of Payment" above
  602.  
  603.           Your Name_____________________________________________________________
  604.  
  605.           Company Name__________________________________________________________
  606.  
  607.           Address_______________________________________________________________
  608.  
  609.           ______________________________________________________________________
  610.  
  611.           City___________________________ State/Prov________ Zip________________
  612.  
  613.           Registration     Registration & disk: $29 x qty _____        $_______ 
  614.  
  615.           Source Code      Source disk & license: $30 x qty _____       _______ 
  616.  
  617.           Multiple/        2-4 disks -- deduct 40%
  618.           Wholesale        5 or more -- deduct 50%                     (_______)
  619.  
  620.           Site License     Up to 4 CPUs add $30; Up to 10 add $70
  621.           (add to above)   Up to 20 add $125; Unlimited add $400        _______ 
  622.  
  623.           Printed          One copy is $8, 2 or more are $6 each
  624.           Manuals          Qty _____ x $_____ each                      _______ 
  625.  
  626.           Shipping &       Canada, AK, HI, VI, PR add $3 extra          _______ 
  627.            Expenses        Other countries add $9 per copy              _______ 
  628.  
  629.                            ** T O T A L **                              _______ 
  630.  
  631.  
  632.           Disk size & quantity   [__] 3½"                   [__] 5¼"
  633.           Drive density          [__] Low (DD) required     [__] High (HD) okay
  634.           Extended densities     [__] FDFORMAT extended densities okay
  635.  
  636.           Which version are you using now?_____________________________________
  637.  
  638.           Where did you get it?________________________________________________
  639.  
  640.  
  641.           ANGELIB has been delivered to and accepted by customer.  Upon receipt          _______
  642.           of this paid invoice the latest Registered Edition disk and any
  643.           options chosen above will be sent.  Send U.S. funds or CIMO.  NYS
  644.           orders add local sales tax.  Mail this page with your cash (use
  645.           Registered mail), cheque or money order to Angel Babudro, 28 Mulberry
  646.           Street, Clinton, NY USA 13323-1506. Please allow 1-3 weeks. Thank you!
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.                                     ANGELIB for BC7/PDS                       10                                    ___________________
  662.  
  663.  
  664.  
  665.  
  666.           VIII. SYSTEM REQUIREMENTS
  667.  
  668.                 All you need is PC/MS-DOS 3.3 or later, PDS/BC 7.1, and a
  669.           computer.  You will need 200k to 500k of disk space for the files,
  670.           depending on which ones you decide to keep around.
  671.  
  672.  
  673.           IX.   FILES WHICH MAKE UP ANGELIB
  674.  
  675.                 The unregistered edition is made up of the following files:
  676.  
  677.                 ANGEL.LIB     The linker library to make EXE files (check
  678.                               MAKEQLB.BAT for help making a Quick Library)
  679.                 ANGEL.BI      The include file, function & subroutine
  680.                               definitions
  681.                 COLOURS.BI    Colour codes definitions, use is optional
  682.                 FKEYS.BI      Function key definitions, use is optional
  683.                 ANGEL.TXT     The ASCII text file of this document
  684.                 ANGEL.WP      The WordPerfect file of this document (so you can
  685.                               format it for your printer)
  686.                 QSORT.BAS     Source code to this public domain routine
  687.                 FKEY.LST      Sample file for use with FKEYS routine
  688.                 READ.ME       A file containing late-breaking news...  May or
  689.                               may not be part of the package you get
  690.                 ORDER.FRM     Order form for all of my software
  691.                 SYSOP.DOC     Sysop information
  692.                 VENDOR.DOC    Disk vendors & Sysops: pricing, detailed
  693.                               description, and distribution information
  694.                 COMPARE.EXE   A byte-by-byte file compare utility.  Displays in
  695.                               hex, decimal, and ASCII. Type COMPARE for help.
  696.                 DUMP.EXE      Hex/octal/decimal file viewer. Type DUMP for help.
  697.  
  698.                 The registered edition also includes:
  699.  
  700.                 FAROBJ.EXE    Object modules for creating custom libraries
  701.                               (self-extracting archive)
  702.                 MLIB.BAT      Sample batch file for creating custom libraries
  703.                               from OBJ modules.  I use it all the time to re-
  704.                               compile libraries during software development. 
  705.                               Allows OBJs to be anywhere you like rather than
  706.                               all in one directory
  707.                 MLIB.LSP      Sample specification file for MLIB.BAT
  708.                 ANGEL.INF     Object module information file for use with Tom
  709.                               Hanlin's LIBWIZ utility - this makes it MUCH
  710.                               easier to create your own custom libraries if
  711.                               you've never done it before.
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.                                     ANGELIB for BC7/PDS                       11                                    ___________________
  728.  
  729.  
  730.  
  731.  
  732.           X.    USING ANGELIB
  733.  
  734.                 Basically, just put the files wherever you want them and use the
  735.           INCLUDE meta-command to place the .BI definition files in your
  736.           programme (e.g., '$INCLUDE: 'Angel.bi' and '$INCLUDE: 'PtrRec.def'). 
  737.           Using the $INCLUDE file lets you call subroutines without the CALL key
  738.           word.
  739.  
  740.                 Creating a QLB (Quick Library)
  741.  
  742.                 If you want to use ANGEL.LIB routines in the QBX interactive
  743.           environment you need to make a file called ANGEL.QLB first.  To do
  744.           this just use the command:
  745.  
  746.                 link /qu angel.lib,angel.qlb,nul,qbxqlb;
  747.  
  748.                 If you get "Bad command or file name" you will need to supply
  749.           the drive and path containing the file LINK.EXE.
  750.  
  751.                 When you start QBX just use "QBX /L d:\path\ANGEL" (replacing
  752.           d:\path with your drive and pathname) - this will load the quick
  753.           library into memory so you can run the routines.  Please note that
  754.           it's a large library; if you have extended memory QBX will load some
  755.           of the library "high."  If you run out of memory with a large
  756.           programme I can only console you with the fact that most of my
  757.           software is too large to run in the QBX environment and the Microsoft
  758.           help-line wasn't even able to help me.
  759.  
  760.                 Rather than write a probably-lame demonstration programme to
  761.           show off ANGELIB's functions, I would like to suggest that you check                   _______
  762.           out my shareware from whence this library sprang:  What Mailing List?
  763.           (WML), What Vehicle History? (WVH), What Job Summary? (WJS), What
  764.           Floppy Format? (WFF), and What Tape Back-up (WTB).
  765.  
  766.                 Registered Edition users have individual OBJ files which can be
  767.           combined into custom libraries, even adding OBJs from other libraries
  768.           (such as EZ-Windows) or your own routines.  I find it easiest to make
  769.           a file, using an ASCII editor, which contains all of the names of the
  770.           OBJs I want in the library (see MLIB.LSP for a sample).  This file
  771.           contains one routine per line, preceded by a "+" and ending with a "&"
  772.           (which is what LIB requires since this file is passed directly to
  773.           LIB.EXE).  This makes it easy to recompile the library if you changed
  774.           some code or want to add or delete routines.
  775.  
  776.                 Another alternative for making your own libraries is to use Tom
  777.           Hanlin's LIBWIZ utility.  This makes things very easy since LIBWIZ is
  778.           smart enough to figure out if a routine requires others (for example,
  779.           the INFORM%() function requires several other routines) and will
  780.           include those other routines automatically.  The drawback to LIBWIZ is
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.                                     ANGELIB for BC7/PDS                       12                                    ___________________
  794.  
  795.  
  796.  
  797.  
  798.           that it has no "save" feature so you have to select each module every
  799.           time (which can get a bit tedious if you have 50 modules or so).  If
  800.           you've never tried LIBWIZ you ought to at least check it out.  The
  801.           most current version I know of is LIBWIZ13.  To use it just enter
  802.           LIBWIZ ANGEL mylibname (where "mylibname" is your library's name).
  803.  
  804.  
  805.           XI.   REFERENCE
  806.  
  807.                 ANGELIB is made up of functions and subroutines.  Functions                _______
  808.           return a value to a variable - e.g., a% = CalcAttr(White, Blue) puts a
  809.           value in a% - whereas subroutines do not - e.g., BackUpMsg just prints
  810.           a message on the screen.
  811.  
  812.                 The general syntax of a function call is
  813.           var = Function(param1,param2,etc).  For a subroutine, the "formal"          _________________________________
  814.           syntax is "[CALL] subname(param1, param2, etc.)" although "CALL" is                     ____________________________________
  815.           not needed when you include ANGEL.BI in your code.
  816.  
  817.                 Subroutines do not yield any "result," but they often modify one
  818.           or more variables which are passed to them.  DBFHeader is a good
  819.           example of this.
  820.  
  821.                 The routines below each show their name at the left margin and a
  822.           sample calling sequence aligned with the right margin, under which is
  823.           the english explanation of the routine's purpose followed by the
  824.           definition of variables.
  825.  
  826.  
  827.           BackupMsg                                                    BackupMsg
  828.             Prints  what I think of  as a pseudo-subliminal reminder to back-up
  829.             your data  :)  A little reminder pops  onto the screen for a second
  830.             then the screen is cleared.
  831.  
  832.             Pass            ____
  833.                  Nothing
  834.  
  835.             Returns            _______
  836.                  Nothing
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.                                     ANGELIB for BC7/PDS                       13                                    ___________________
  860.  
  861.  
  862.  
  863.  
  864.           BarMenu%    opt% = BarMenu%(r%,c%,norm%,rev%,opts$(),seed%,getit%,ms%)
  865.             Displays  a horizontal bar menu and  waits for user's choice of the
  866.             options.
  867.  
  868.             Pass            ____
  869.                  r%/c%       Row and column at which to begin displaying
  870.  
  871.                  norm%/rev%  Normal   &   reverse   display   attributes   (via
  872.                              CalcAttr%)
  873.  
  874.                  opts$()     String array containing choices
  875.  
  876.                  seed%       Option  number  to  highlight initially  (normally
  877.                              "1")
  878.  
  879.                  getit%      Flag to  get user's input:   If true routine waits
  880.                              for user  to select an option or press an extended
  881.                              key (e.g., an arrow,  PgUp, etc.) or ENTER or Esc.
  882.                              If  False,  the  routine  displays the  menu  then
  883.                              exits (which is  useful for displaying a bunch  of
  884.                              horizontal menus on a setup screen, for example).
  885.  
  886.                  ms%         Mouse support (0=no, non-zero=yes)
  887.  
  888.             Returns            _______
  889.                  Function    If getit%  is true, the  user's final keypress  is
  890.                              returned - ENTER  (13), Esc (27), or extended  key
  891.                              code (2nd byte of code).  If getit% is false  then
  892.                              the returned value is irrelevant.
  893.  
  894.                  seed%       The number of the highlighted item, numbered  from
  895.                              left to right starting with one.
  896.  
  897.  
  898.  
  899.  
  900.           CalcAttr%                             attr% = CalcAttr% (Fore%, Back%)
  901.             For use with routines that need a single integer colour code.
  902.  
  903.             Pass            ____
  904.                  Fore%       Foreground colour code
  905.  
  906.                  Back%       Background colour code
  907.  
  908.             Returns            _______
  909.                  Fore% + (Back% * 16)
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.                                     ANGELIB for BC7/PDS                       14                                    ___________________
  926.  
  927.  
  928.  
  929.  
  930.           ChooseFD$                                             fdd$ = ChooseFD$
  931.             This is a menu of available floppy disk drives.  The function:
  932.  
  933.             1.   Checks the number of floppy disk drives
  934.  
  935.             2.   If there is only one drive then "A:" is returned, otherwise
  936.  
  937.             3.   A pop-up  menu of  floppy drives is  presented from  which the
  938.                  user may choose one or press Esc.
  939.  
  940.             Pass            ____
  941.                  Nothing
  942.  
  943.             Returns            _______
  944.                  Floppy disk  drive  letter followed  by a  colon, or  a  blank
  945.                  string if user presses Esc.
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.                                     ANGELIB for BC7/PDS                       15                                    ___________________
  992.  
  993.  
  994.  
  995.  
  996.           ChooseFile$         File$ = ChooseFile$(FSpec$,Exclude$,ExtInfo%,ms%))
  997.             Presents  a  scrollable  list  of files  in  a  window which  match
  998.             FileSpec$ (excluding Exclude$) and waits for user to choose one.
  999.  
  1000.             Pass            ____
  1001.                  FSpec$      File specification  to include in  the list.   May
  1002.                              include drive  and path name,  if necessary.   For
  1003.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  1004.  
  1005.                  Exclude$    File   specification  to  exclude  from  the  list
  1006.                              (e.g., "*.bak").   Do  not put a drive  or path in
  1007.                              this.
  1008.  
  1009.                  ExtInfo%    Extended   Information   flag   &   record   size.
  1010.                              Controls  display  of  extended information  (file
  1011.                              size &  long description).   Set this variable  to
  1012.                              zero  for no  extra file  information,  or to  the
  1013.                              record size to show the number  of records in  the
  1014.                              file  along with description (if a file DESCRIPT.*
  1015.                              is  in  the directory  it  will be  used for  file
  1016.                              descriptions).    To  show size  in  bytes  use  a
  1017.                              record size of one.  If  negative information will
  1018.                              be  in  DOS  Name/Size/Description   order.     If
  1019.                              positive  Description/Name/Size   order  will   be
  1020.                              displayed.
  1021.  
  1022.                  ms%         Mouse support flag (true/false).
  1023.  
  1024.             Returns            _______
  1025.                  File name  chosen without  drive or path, or  null string ("")                                   _______
  1026.                  if user presses Esc
  1027.  
  1028.             Notes            _____
  1029.                  If ExtInfo%  is non-zero,  font files *.SFP and  *.SFL will be
  1030.             shown with  their font  names and  other files  will be shown  with
  1031.             their size & any description.
  1032.                  I  patterned the  format of  the DESCRIPT.*  file after  4DOS:
  1033.             file name  followed by  a space  and up  to 40  characters for  the
  1034.             description.  4DOS makes a hidden file, however.  ChooseFile$  will
  1035.             only  read "normal" (not  hidden) files right now.   I'll soon have
  1036.             it so ChooseFile$ will read hidden files, too.
  1037.                  ChooseFile$()  uses the  EZ-Windows  routine ScrlMenu  and the
  1038.             PBClone routines ScrSave & ScrRest.
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.                                     ANGELIB for BC7/PDS                       16                                    ___________________
  1058.  
  1059.  
  1060.  
  1061.  
  1062.           ChooseFileS$             F$ = ChooseFileS$(Inc$,Exc$,Info%,many%,ms%))
  1063.             Shows a scrollable  list of files in a  window which match Inc$ and
  1064.             excluding Exc$ then waits for user to choose one or more.
  1065.  
  1066.             Pass            ____
  1067.                  Inc$        File specification  to include in  the list.   May
  1068.                              include drive  and path name,  if necessary.   For
  1069.                              example, "*.DAT" or "C:\DATA\*.DAT" are valid.
  1070.  
  1071.                  Exc$        File   specification  to  exclude  from  the  list
  1072.                              (e.g., "*.bak").   Do  not put a drive  or path in
  1073.                              this.
  1074.  
  1075.                  Info%       Extended   Information   flag   &   record   size.
  1076.                              Controls  display  of  extended information  (file
  1077.                              size &  long description).   Set this variable  to
  1078.                              zero  for no  extra file  information,  or to  the
  1079.                              record size to show the number  of records in  the
  1080.                              file  along with description (if a file DESCRIPT.*
  1081.                              is  in  the directory  it  will be  used for  file
  1082.                              descriptions).    To  show size  in  bytes  use  a
  1083.                              record size of one.  If  negative information will
  1084.                              be  in  DOS  Name/Size/Description   order.     If
  1085.                              positive  Description/Name/Size   order  will   be
  1086.                              displayed.
  1087.  
  1088.                  many%       True=Allow multiple picks, False=Just one
  1089.  
  1090.                  ms%         Mouse support flag (true/false).
  1091.  
  1092.             Returns            _______
  1093.                  File names without drive or  path, or null string ("") if user                            _______
  1094.                  presses Esc. Names are padded to length of 12.
  1095.  
  1096.             Notes            _____
  1097.                  This  routine ends  up  about  10k larger  than  ChooseFile$()
  1098.             since it requires  an EZ-Windows routine (ScrlTag) which the  other
  1099.             routine does not.  If your  programme already uses ScrlTag you will
  1100.             only see a slight increase in your programme size  (about .5k) over
  1101.             using ChooseFile$().  See ChooseFile$() for other notes.
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.                                     ANGELIB for BC7/PDS                       17                                    ___________________
  1124.  
  1125.  
  1126.  
  1127.  
  1128.           ChoosePort%                      PtrPort% = ChoosePort%(default%, ms%)
  1129.             Presents a pop-up menu of printer ports (LPT1, LPT2, and LPT3)  and
  1130.             waits for user to pick one or press Esc.
  1131.  
  1132.             Pass            ____
  1133.                  default%    Default (current) printer port setting (1-3).
  1134.  
  1135.                  ms%         Mouse support available: 0 = No, 1 = Yes
  1136.  
  1137.             Returns            _______
  1138.                  Port number (1-3) or zero if user presses Esc
  1139.  
  1140.  
  1141.  
  1142.  
  1143.           ChoosePtr%      Ok% = ChoosePtr%(pType$, path$, PtrNo%, PtrPort%, ms%)
  1144.             Presents a  pop-up menu  of  printer choices  from the  PRINTER.DAT
  1145.             file.   If there are less than 15 choices (that is, all choices fit
  1146.             inside the window), then the default (PtrNo%) will be highlighted.
  1147.  
  1148.             Pass            ____
  1149.                  pType$      Printer types to include in the menu:
  1150.                              D = Dot matrix printers
  1151.                              L = Laser printers
  1152.                              B = Both
  1153.  
  1154.                  path$       File  specification  for  PRINTER.DAT file.  path$
  1155.                              may contain a  drive, path, and/or file name.   If
  1156.                              no  file name  is given, PRINTER.DAT is  used.  If
  1157.                              no  drive &  path are  given, the  current drive &
  1158.                              path are used.
  1159.  
  1160.                  PtrNo%      Record  number  of  currently  chosen  printer  in
  1161.                              PRINTER.DAT
  1162.  
  1163.                  ms%         0 = Keyboard only
  1164.                              1 = Use mouse, too
  1165.  
  1166.             Returns            _______
  1167.                  pType$      Changed  to "D"  if dot  matrix  chosen or  "L" if
  1168.                              laser printer chosen
  1169.  
  1170.                  PtrNo%      PRINTER.DAT record number for the chosen printer
  1171.  
  1172.                  PtrPort%    The port number selected for the  printer (LPT1 is
  1173.                              1, LPT2 is 2, etc.) or zero if user presses Esc
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.                                     ANGELIB for BC7/PDS                       18                                    ___________________
  1190.  
  1191.  
  1192.  
  1193.  
  1194.           ContCan%                                                 i% = ContCan%
  1195.             Displays  "Continue" and "Cancel" keys  at the bottom of the screen
  1196.             and waits for response.
  1197.  
  1198.             Pass            ____
  1199.                  Nothing
  1200.  
  1201.             Returns            _______
  1202.                  TRUE (-1) if user presses Esc
  1203.                  FALSE (0) if user presses Return (aka Enter)
  1204.  
  1205.  
  1206.  
  1207.  
  1208.           DateFmt$                  FormattedDate$ = DateFmt$(d%, m%, y%, intl%)
  1209.             I use this routine to print  the formatted date after getting input
  1210.             from  the user.   You  can  "PRINT DateFmt$()" or  assign it  to  a
  1211.             variable.  Use the ChooseCountry% menu to let the user set Intl%.
  1212.  
  1213.             Pass            ____
  1214.                  d%          Day on the month
  1215.                  m%          Month number
  1216.                  y%          Year (4-digits)
  1217.                  Intl%       International formatting
  1218.                              1 = USA (mm/dd/yyyy)
  1219.                              2 = Canadian (dd-mm-yyyy)
  1220.                              3 = USA & Cdn (dd MoName yyyy)
  1221.                              4 = International (dd MoName yyyy)
  1222.  
  1223.             Returns            _______
  1224.                  Formatted date
  1225.  
  1226.  
  1227.  
  1228.  
  1229.           DateVal%                                      dv% = DateVal%(TheDate$)
  1230.             Converts  dates from 1992  to 2078  to an  integer number  for date
  1231.             calculations.   For  example,  DateVal%(Date1$)  - DateVal%(Date2$)
  1232.             would give  you the number  of days between the  two dates.   Years
  1233.             prior to 1992 are converted to 1992.
  1234.  
  1235.             Pass            ____
  1236.                  TheDate$    Date formatted the same as BASIC's DATE$ function
  1237.  
  1238.             Returns            _______
  1239.                  Integer value based on the date
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.                                     ANGELIB for BC7/PDS                       19                                    ___________________
  1256.  
  1257.  
  1258.  
  1259.  
  1260.           DBFHeader             DBFHeader file$, Fld$(), reclen%, recs&, NoFlds%
  1261.             Opens  .DBF  file FileName$  and returns  field names  in Field$(),
  1262.             record length in  reclen%, number of records in  the file in recs&,
  1263.             and number  of fields in NoFields%.   You can  then call DBFPickFld
  1264.             to pick fields from the list.  See also DBFPickFld function.
  1265.  
  1266.             Pass            ____
  1267.                  file$       The DBF  file name, including  drive and path,  if
  1268.                              necessary
  1269.  
  1270.                  Fld$()      This array  must be initialized  prior to  calling
  1271.                              DBFHeader  to  the  maximum  number of  fields  (I
  1272.                              would suggest  setting it to  at least 50,  unless
  1273.                              you know better).
  1274.  
  1275.             Returns            _______
  1276.                  Fld$()      The names of the fields.  The first field name  is
  1277.                              in Field$(1), etc.
  1278.  
  1279.                  reclen%     The file's record length
  1280.  
  1281.                  recs&       The number of records on file
  1282.  
  1283.                  NoFlds%     The number of fields
  1284.  
  1285.  
  1286.  
  1287.  
  1288.           Delay                                                       Delay Sec!
  1289.             Delays for  Sec! seconds.  I use  this for copyright messages, etc.
  1290.             The accuracy is roughly +/- .1 seconds on a 386/40.
  1291.  
  1292.             Pass            ____
  1293.                  Sec!        Number of seconds to delay (floating point)
  1294.  
  1295.             Returns            _______
  1296.                  Nothing
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                                     ANGELIB for BC7/PDS                       20                                    ___________________
  1322.  
  1323.  
  1324.  
  1325.  
  1326.           DrawFDD                                   DrawFDD Light%, iRow%, iCol%
  1327.             Draws a text picture of a floppy on the screen at iRow%,iCol%.   If
  1328.             Light% is  TRUE (-1)  then the  light blinks  red (bright  white on
  1329.             mono monitors), else it is white.
  1330.  
  1331.             Pass            ____
  1332.                  Light%      True if drive "light" is to blink, false if not
  1333.  
  1334.                  iRow%       Top row of picture
  1335.  
  1336.                  iCol%       Left column of picture
  1337.  
  1338.             Returns            _______
  1339.                  Nothing
  1340.  
  1341.  
  1342.  
  1343.  
  1344.           DrawHDD                             DrawHDD Light%, iRow%, iCol%, Msg$
  1345.             Similar  to DrawFDD but  draws a  text picture  of a hard  disk and
  1346.             places the current drive (CURDRIVE) letter in the box.
  1347.  
  1348.             Pass            ____
  1349.                  Light%      True if drive "light" is to blink, else false
  1350.  
  1351.                  iRow%       Top row of picture
  1352.  
  1353.                  iCol%       Left column of picture
  1354.  
  1355.                  Msg$        A  message up  to 20  characters  long to  display
  1356.                              inside the  picture.  If  longer than  20 chars it
  1357.                              will be truncated.
  1358.  
  1359.             Returns            _______
  1360.                  Nothing
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.                                     ANGELIB for BC7/PDS                       21                                    ___________________
  1388.  
  1389.  
  1390.  
  1391.  
  1392.           DrvSpace                         DrvSpace (Drive$, Total&, Free&, EC%)
  1393.             Returns total space and free space (in bytes) of drive Drive$.
  1394.  
  1395.             Pass            ____
  1396.                  Drive$      Disk drive letter (e.g., "C")
  1397.  
  1398.             Returns            _______
  1399.                  Total&      Total bytes are returned in this variable
  1400.  
  1401.                  Free&       Free bytes are returned in this variable
  1402.  
  1403.                  EC%         DOS error  code is  returned in  this variable  or
  1404.                              zero if no error
  1405.  
  1406.  
  1407.  
  1408.  
  1409.           ElapsedTime         ElapsedTime STime$, ETime$, Hour%, Minutes%, Secs%
  1410.             Calculates elapsed time.
  1411.  
  1412.             Pass            ____
  1413.                  STime$      Starting  time  hh:mm:ss  (same  format  as  TIME$
  1414.                              function)
  1415.  
  1416.                  ETime$      Ending  time   hh:mm:ss  (same   format  as  TIME$
  1417.                              function)
  1418.  
  1419.             Returns            _______
  1420.                  ETime$      Formatted elapsed time (hh:mm:ss)
  1421.                  Hour%       Elapsed hours
  1422.                  Minutes%    Elapsed minutes
  1423.                  Secs%       Elapsed seconds
  1424.  
  1425.             Example            _______
  1426.                  S$ = TIME$              'Starting time
  1427.                  (do whatever needs to be done)
  1428.                  E$ = TIME$              'Ending time
  1429.                  ElapsedTime S$, E$, H%, M%, S%
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.                                     ANGELIB for BC7/PDS                       22                                    ___________________
  1454.  
  1455.  
  1456.  
  1457.  
  1458.           ErrScn                                        ErrScn ErrCode%, Module$
  1459.             Presents  an  error  screen showing  error  number,  english  text,
  1460.             possible solution, and module name.
  1461.  
  1462.             Pass            ____
  1463.                  ErrCode%    Error number
  1464.  
  1465.                  Module$     Module name
  1466.  
  1467.             Returns            _______
  1468.                  Nothing
  1469.  
  1470.  
  1471.  
  1472.  
  1473.           ErrSolve$                                            ErrSolve$ Number%
  1474.             Prints  possible  solution  to  error  number  Number%.    Used  by
  1475.             subroutine ErrScn.   Not  very extensive (to  save memory),  but it
  1476.             sure beats no error handling...
  1477.  
  1478.  
  1479.  
  1480.  
  1481.           ErrText$                                              ErrText$ Number%
  1482.             Prints text of error Number%.  Used by ErrScn.
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.                                     ANGELIB for BC7/PDS                       23                                    ___________________
  1520.  
  1521.  
  1522.  
  1523.  
  1524.           FileBackup%                      ec% = FileBackup%(FileMask$, Method%)
  1525.             Asks for  user to  enter path (including  drive) on which  to store
  1526.             the   back-up  (e.g.,  "A:\"   or  "\TEMP\BACKUPS")  then  backs-up
  1527.             FileMask$ to drive Drive$ using Method%.
  1528.  
  1529.             Pass            ____
  1530.                  FileMask$   File  mask  to  include  in  restore  (e.g.,  *.*,
  1531.                              *.DAT, OLD??.*, etc.)
  1532.  
  1533.                  Method%     The method to use in making the back-up
  1534.                              1 = DOS Copy
  1535.                              2 = ARJ (req. a lot of free memory)
  1536.                              3 = LHARC
  1537.                              4 = PKZIP
  1538.  
  1539.             Returns            _______
  1540.                  0 = Completed
  1541.                  1 = Cancelled
  1542.                  2 = Bad file mask
  1543.                  3 = No files matching file mask
  1544.  
  1545.             Notes            _____
  1546.                  Requires GetValidPath$() function (GETPATH.OBJ)
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.                                     ANGELIB for BC7/PDS                       24                                    ___________________
  1586.  
  1587.  
  1588.  
  1589.  
  1590.           FileRestore%                    ec% = FileRestore%(FileMask$, Method%)
  1591.             Menu of  floppy drives  then if  Method% is  2, 3, or  4 a  menu of
  1592.             files matching  FileMask$ (user  can select  one to  restore).   If
  1593.             Method%=1 all files matching FileMask$ are restored.
  1594.  
  1595.             Pass            ____
  1596.                  FileMask$   Files to restore (*.*, *.DAT, OLD??.*, etc.)
  1597.  
  1598.                  Method%     The method to use in restoring
  1599.                              1 = DOS Copy
  1600.                              2 = ARJ (req. a lot of free memory)
  1601.                              3 = LHARC
  1602.                              4 = PKZIP
  1603.                              Anything else = DOS Copy
  1604.  
  1605.             Returns            _______
  1606.                  0 = Completed
  1607.                  1 = Cancelled
  1608.                  2 = Bad file mask
  1609.                  3 = No files matching file mask
  1610.  
  1611.             Notes            _____
  1612.                  Requires ChooseFile$() function (CHOOSEFL.OBJ).
  1613.  
  1614.  
  1615.  
  1616.  
  1617.           FileRestores%                  ec% = FileRestores%(FileMask$, Method%)
  1618.             Same  as FileRestore%() function  above except that user can select
  1619.             one  or  multiple  files  to restore.    See  FileRestore%() for  a
  1620.             description of the parameters.
  1621.  
  1622.             Notes            _____
  1623.                  Requires ChooseFileS$()  function (CHOOSEFS.OBJ).  Will add ½k
  1624.             to 10k to your code size over using FileRestore%().
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                     ANGELIB for BC7/PDS                       25                                    ___________________
  1652.  
  1653.  
  1654.  
  1655.  
  1656.           FKeys                                                      FKeys Keys$
  1657.             Displays a list of function keys at the bottom of the screen.
  1658.  
  1659.             Pass            ____
  1660.                  Keys$       String of  keys  to be  displayed (e.g.,  "EPNQ").
  1661.                              Plus sign  (+) is  a reserved character.   If  the
  1662.                              first character  is a plus  sign followed by  two-
  1663.                              digits, then the keys are placed  starting on that
  1664.                              row.  For example, "+24EPNQ" would  place the keys
  1665.                              on row 24/25, instead of the default rows 23/24.
  1666.  
  1667.             Notes            _____
  1668.  
  1669.             The file  FKEY.LST  is  seached  first  if it  is  in  the  current
  1670.             directory, then  an internal list is  searched if the  keys are not
  1671.             found.  The format of FKEY.LST ASCII file is:
  1672.  
  1673.                  KeyCode$,KeyName$,KeyDesc$,XPos%
  1674.  
  1675.             For example, a  line reading "C,Enter,Continue,51" would place  the
  1676.             key  "Enter" (in  reverse  video)  and the  description  "Continue"
  1677.             under  it at  column  51  whenever an  FKeys  "C"  is issued  in  a
  1678.             program.  See the sample FKEY.LST file.
  1679.  
  1680.             The routine scans the first screen row  at column 1 for the  colour
  1681.             to use.
  1682.  
  1683.             The keys "AacCFNoPQSsTtyn" are defined internally as follows:
  1684.                  A - Up and Down arrows
  1685.                  a - Up/Down/Right/Left arrows
  1686.                  C - Esc = Cancel
  1687.                  c - Enter = Continue
  1688.                  N - PgDn = Next
  1689.                  o - Enter = OK
  1690.                  P - PgUp = Prev
  1691.                  Q - Esc = Quit
  1692.                  S - Enter = Select
  1693.                  s - Esc = Stop
  1694.                  T - TAB = Next
  1695.                  t - BackTAB = Prev
  1696.                  y - Enter = Yes
  1697.                  n - Esc = No
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.                                     ANGELIB for BC7/PDS                       26                                    ___________________
  1718.  
  1719.  
  1720.  
  1721.  
  1722.           FmtFDD%                                                  ec% = FmtFDD%
  1723.             Format floppy disks.
  1724.  
  1725.             Pass            ____
  1726.                  Nothing
  1727.  
  1728.             Returns            _______
  1729.                  TRUE if function completed
  1730.                  FALSE if cancelled
  1731.  
  1732.             Notes            _____
  1733.                  It's easiest to give you an algorithm of the logic flow:
  1734.  
  1735.                  Search DOS PATH for WFF.EXE (What Floppy Format?)
  1736.                  If found, run it and exit
  1737.                  How many drives does this computer have?
  1738.                  If more than 1 present list
  1739.                  Issue DOS command "FORMAT d:" and exit
  1740.  
  1741.                  I always  put a  "Format Floppies" option  under my  File menu
  1742.                  which  simply  does  "i% =  FmtFDD".   See  also  FromFDD% and
  1743.                  ToFDD% functions.
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.                                     ANGELIB for BC7/PDS                       27                                    ___________________
  1784.  
  1785.  
  1786.  
  1787.  
  1788.           FontDL                          FontDL FontFile$, Pts%, Port%, FontNo%
  1789.             Downloads  a  soft  font file  to a  laser  printer and  displays a
  1790.             status window while doing so.
  1791.  
  1792.             Pass            ____
  1793.                  FontFile$   The full  file name, including  drive and path  if
  1794.                              necessary,  of   the   soft   font  file   to   be
  1795.                              downloaded.
  1796.  
  1797.                  Port%       The port number (1-3) of the printer.
  1798.  
  1799.                  FontNo%     PCL font number  to assign this font (e.g.,  400).
  1800.                              Numbers  >128 are  generally best  to  use as  the
  1801.                              lower numbers have  standard fonts which typically
  1802.                              apply to them.
  1803.  
  1804.             Returns            _______
  1805.                  Pts%        The  point size of  the font  is returned  in this
  1806.                              variable.
  1807.  
  1808.             Example            _______
  1809.                  ok% = FontDL%(FontFile$, Pts%, Port%, FontNo%)
  1810.                  if ok% then
  1811.                      PRINT #PrintFile%, chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1812.                      end if
  1813.  
  1814.             Notes            _____
  1815.                  The above  sequence selects FontNo% as  the primary font  (the
  1816.                  '('  does  this).   To select  it  as the  secondary font  use
  1817.                  chr$(27)+"("+ltrim$(str$(FontNo%))+"X"
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.                                     ANGELIB for BC7/PDS                       28                                    ___________________
  1850.  
  1851.  
  1852.  
  1853.  
  1854.           GetDate                          GetDate d%, m%, y%, Intl%, Row%, Col%
  1855.             Accepts date from keyboard at {Row%,Col%}  unformatted (no symbols,
  1856.             just  numbers run  together).   Extended keys  (arrows, PgUp, etc.)
  1857.             will  exit  plus  a mouse  button  push  or  the  Alt  key.   Intl%
  1858.             determines the sequence of entry.
  1859.  
  1860.             Pass            ____
  1861.                  d%          Default  day (1-31),  zero to  use to-day's  date,
  1862.                              negative to skip the day
  1863.  
  1864.                  m%          Default  month number, zero to  use current month,
  1865.                              negative to skip the month
  1866.  
  1867.                  y%          Default  year  number  (4  digits),  zero  to  use
  1868.                              current year, negative to skip the year
  1869.  
  1870.                  Intl%       Country  setting   (1=US,  2=Cdn,   3=US  &   Cdn,
  1871.                              4=Other)
  1872.  
  1873.                  Row%        Screen row on which to get input
  1874.  
  1875.                  Col%        Screen column in which to get input
  1876.  
  1877.             Returns            _______
  1878.                  d%, m%, and y% are set to user's input
  1879.  
  1880.  
  1881.  
  1882.  
  1883.           GetFileDesc$                               desc$ = GetFileDesc$(file$)
  1884.             Get a  file's description  (long name) from the  DESCRIPT.* file in
  1885.             the current directory.
  1886.  
  1887.             Pass            ____
  1888.                  file$       DOS file  name.   You can specify a  drive & path,
  1889.                              but  the current  directory will  be accessed  for
  1890.                              the DESCRIPT.* file.
  1891.  
  1892.             Returns            _______
  1893.                  Description (long name) of the file.
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.                                     ANGELIB for BC7/PDS                       29                                    ___________________
  1916.  
  1917.  
  1918.  
  1919.  
  1920.           GetFileName$     afile$ = GetFileName$(InOut%, ttl$, msg$, dflt$, ms%)
  1921.             Get  a file name  from user  in a  window, verify proper  format of
  1922.             entry, and check status of file.
  1923.  
  1924.             Pass            ____
  1925.                  InOut%      Input or Output file?
  1926.                              1 =  Input file  (file must  exist; error  message
  1927.                              displayed if not) ('1' is for 'I'nput)
  1928.                              0 = Output file  (checks that file does not exist;
  1929.                              if file exists, presents a warning  that file will
  1930.                              be over-written) ('0' is for 'O'utput)
  1931.  
  1932.                  ttl$        Title of window
  1933.  
  1934.                  msg$        Help  message displayed  on the  screen below  the
  1935.                              file entry window
  1936.  
  1937.                  dflt$       Default response
  1938.  
  1939.                  ms%         Mouse flag (0=no mouse, non-zero=use mouse)
  1940.                              Mouse cursor should be invisible (off)
  1941.  
  1942.             Returns            _______
  1943.                  Name of file, including drive and path (if entered)
  1944.  
  1945.  
  1946.  
  1947.  
  1948.           GetFileNames$   files$ = GetFileNames$(InOut%, ttl$, msg$, dflt$, ms%)
  1949.             Same as  GetFileName$ except  that user can  specify more  than one
  1950.             input file.
  1951.  
  1952.             Pass            ____
  1953.                  InOut%      Input or Output file?
  1954.                              1  = Single input file
  1955.                              -1 = Multiple input files
  1956.                              0  = Output file
  1957.  
  1958.             Everything else is the same as GetFileName$() above.
  1959.  
  1960.             Returns            _______
  1961.                  Drive and  path (if entered) followed  by file name(s)  padded
  1962.             to 12 spaces.
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.                                     ANGELIB for BC7/PDS                       30                                    ___________________
  1982.  
  1983.  
  1984.  
  1985.  
  1986.           GetFontInfo                      GetFontInfo File$, FontName$, PtSize%
  1987.             Provides name  &  size in  the header  of a  soft font  file.   Try
  1988.             FontDL% on your laser for a demonstration of this.
  1989.  
  1990.             Pass            ____
  1991.                  File$       The name  of the  soft font,  including drive  and
  1992.                              path, if necessary.
  1993.  
  1994.             Returns            _______
  1995.                  FontName$   The  long name  of the  font is  returned in  this
  1996.                              variable, if present  (some fonts do not have  any
  1997.                              name in the header)
  1998.  
  1999.                  PtSize%     In  the font file's header  is a point size -- the
  2000.                              integer  value   of  this  is  returned   (decimal
  2001.                              chopped off).   Although this  should be the  real
  2002.                              point size, it's possible for it to be wrong.
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.                                     ANGELIB for BC7/PDS                       31                                    ___________________
  2048.  
  2049.  
  2050.  
  2051.  
  2052.           GetNum$       n$ = GetNum$(iRow%, iCol%, NumMask$, OrigNo$, ExitCode%)
  2053.             Get formatted  numerical input  from user.   Screen colours  at the
  2054.             specified  location will be inverted during input and restored upon
  2055.             exit.
  2056.  
  2057.             Pass            ____
  2058.                  iRow%       Row at which to get input
  2059.  
  2060.                  iCol%       Left column at which to get input
  2061.  
  2062.                  NumMask$    Format  mask.   Valid  mask  characters  are pound
  2063.                              (#),  dollar ($),  and  comma  (,); all  else  are
  2064.                              literals (same  as PRINT  USING).  E.g.,  "#,###",
  2065.                              "$$##.##" or "(###) ###-####".
  2066.  
  2067.                  OrigNo$     Default number in string  form to avoid  numerical
  2068.                              data type conflicts.   Can be integer or  floating
  2069.                              point.
  2070.  
  2071.             Returns            _______
  2072.                  User's  entry as  a string  (use VAL  to  extract it  into the
  2073.                  proper variable; for example, Cost@=VAL(A$) or Miles%=VAL(A$)
  2074.  
  2075.                  ExitCode%   ASCII value  of key user pressed  to exit.   E.g.,
  2076.                              Esc =  27.   If an extended  key (e.g.,  F4, PgUp,
  2077.                              etc.) is used ExitCode% is negative.
  2078.  
  2079.             Example            _______
  2080.                  A$=GetNum$(15,30,"$$###.##",STR$(UnitPrice@),ExitCode%)
  2081.  
  2082.                  In  the  above  example  an input  field  will  be created  at
  2083.                  location (15,30).   The original  number, UnitPrice@, will  be
  2084.                  formatted and  displayed using the  mask "$$###.##", then  the
  2085.                  computer will  wait for the  user's input.   The key that  the
  2086.                  user  presses  to  exit  the field  will  be  returned in  the
  2087.                  variable ExitCode%.
  2088.  
  2089.                  See FKEYS.BI for key definitions.
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.                                     ANGELIB for BC7/PDS                       32                                    ___________________
  2114.  
  2115.  
  2116.  
  2117.  
  2118.           GetValidPath               GetValidPath Drv$, path$, Msg$, InOut%, ms%
  2119.             Displays  Msg$ then asks user for  a valid path name, defaulting to
  2120.             Drv$ and  Path$.  If path does not  exist and it  is being used for
  2121.             output, user is asked if s/he wants to create it.
  2122.  
  2123.             Pass            ____
  2124.                  Drv$        Default drive (e.g., "C:")
  2125.  
  2126.                  Path$       Default path (e.g., "\TEST\DIR")
  2127.  
  2128.                  Msg$        Helpful message  to display on  the screen  (using
  2129.                              Inform%)
  2130.  
  2131.                  InOut%      1=Input/0=Output
  2132.                              If  InOut%=0 will  prompt  to create  a  directory
  2133.                              that does not exist.
  2134.  
  2135.                  ms%         0=No mouse, 1=Use mouse
  2136.  
  2137.             Returns            _______
  2138.                  Drv$        Selected drive letter followed by a colon
  2139.  
  2140.                  Path$       Selected path with trailing  foreslash (\)  (e.g.,
  2141.                              "\TEST\DIR\")
  2142.  
  2143.             Notes            _____
  2144.                  The mouse must be initialized and visible to use  it.  To keep
  2145.                  things simple  & save  stack space, the  windows are  at fixed
  2146.                  positions (which also helps keep things consistent, too).
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.                                     ANGELIB for BC7/PDS                       33                                    ___________________
  2180.  
  2181.  
  2182.  
  2183.  
  2184.           GoodbyeScreen          GoodbyeScreen Pkg$, Reg%, FirstUse$, TimesUsed%
  2185.             Presents a  'goobye screen'  with which  I end  my programmes.   It
  2186.             also has  my name on it... :)   When you  register ANGELIB you will
  2187.             get a version which lets you put your copyright message on it.
  2188.  
  2189.             Pass            ____
  2190.                  Pkg$        Package abbreviation  (e.g., "WVH",  "WML", etc.).
  2191.                              Should be a short name to fit properly in window.
  2192.  
  2193.                  Reg%        Registration   flag,  true/false,   controls   the
  2194.                              information displayed
  2195.  
  2196.                  FirstUse$   Date of  first use.   Used to  calculate number of
  2197.                              days package has been used.
  2198.  
  2199.                  TimesUsed%  Number of times package has been used.
  2200.  
  2201.             Returns            _______
  2202.                  Nothing
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.                                     ANGELIB for BC7/PDS                       34                                    ___________________
  2246.  
  2247.  
  2248.  
  2249.  
  2250.           HelpIndex                                  HelpIndex Topic$, FileSpec$
  2251.             Displays a help index (menu) or a specific help screen.
  2252.  
  2253.             Pass            ____
  2254.                  Topic$      A  specific topic to look up (as  might be desired
  2255.                              with context-sensitive help).   If blank an  index
  2256.                              is presented in a scrollable menu.  Once the  user
  2257.                              selects a topic, the help text  is displayed using
  2258.                              the Inform% function.
  2259.  
  2260.                  FileSpec$   The specification  for the help  file.  If  blank,
  2261.                              "*.HLP" is used.   FileSpec$ may contain a  drive,
  2262.                              path, and/or file name (wildcards okay).
  2263.  
  2264.             Returns            _______
  2265.                  Nothing.
  2266.  
  2267.             Notes            _____
  2268.  
  2269.             The help file is an ASCII text file which is arranged like this:
  2270.  
  2271.             Topic #1+chr$(4)+Help information
  2272.               more information at least one space from left
  2273.               more help etc. etc.
  2274.             Topic #2+chr$(4)+Help info...
  2275.  
  2276.             Help  files may contain up to 100 topics.   The total length of the
  2277.             help text for a single entry is limited to 99 lines with  a maximum
  2278.             of  50 characters per line (roughly 4k of text).  Topics MUST begin
  2279.             in column  one, additional  text MUST begin  AFTER column  1 (i.e.,
  2280.             indent the help text at least one space).
  2281.  
  2282.             The topic  may begin with a chr$(1) through  chr$(3) to indicate an
  2283.             outline  level.      For  example,   you  might   have  FILE   then
  2284.             chr$(1)+Open.
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.                                     ANGELIB for BC7/PDS                       35                                    ___________________
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           Inform%    ok% = Inform%(iRow%, iCol%, iWid%, iType%, ms%, snd%, Msg$)
  2317.             Displays a scrollable information window containing up to  99 lines
  2318.             of information.   Msg$ may be any  length.  The routine will  break
  2319.             the message  into lines of  iWid% length  or less.   If the box  is
  2320.             positioned too low on the screen, it will be adjusted upwards.
  2321.  
  2322.             Pass            ____
  2323.                  iRow%       Top row of window
  2324.                  iCol%       Left column of window
  2325.                  iWid%       Window width (in characters)
  2326.  
  2327.                  iType%      Determines buttons (see below)
  2328.                              0="Message" (no buttons)
  2329.                              1="Note" (Ok button)
  2330.                              2="Caution" (Ok/Cancel)
  2331.                              3="Warning" (blinking) (Continue/Stop)
  2332.                              4="Attention" (blinking) (Yes/No)
  2333.  
  2334.                  ms%         Mouse support
  2335.                              0 = No mouse
  2336.                              1 = Mouse available
  2337.                              99 = Reset mouse & use it, if available
  2338.  
  2339.                  snd%        Sound: 0=None 1=Squeak 2=Tick 3=Beep
  2340.                  Msg$        Message  to  display  in  the  window.    Will  be
  2341.                              truncated at 99 lines, if necessary.
  2342.  
  2343.             Returns            _______
  2344.                  TRUE if user presses ENTER to exit
  2345.                  FALSE if user presses ESC to exit
  2346.  
  2347.             Notes            _____
  2348.  
  2349.             All message  types except  zero restore  the screen on  exit.   Use
  2350.             iType%=0  when you want to put  information on the screen and leave
  2351.             it there, such as instructions on how to enter data.
  2352.  
  2353.             The mouse should be turned OFF before calling Inform%
  2354.  
  2355.             Custom Titles            _____________
  2356.  
  2357.             A custom title  can replace the default.   Just place a title  plus
  2358.             chr$(254) at  the start  of your message  (changed from  chr$(4) to
  2359.             allow the code to be imbedded without the use of the CHR$ function
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.                                     ANGELIB for BC7/PDS                       36                                    ___________________
  2378.  
  2379.  
  2380.  
  2381.  
  2382.           InformFill        InformFill Row%, Col%, BegLine%, WinSize%, MLines$()
  2383.             Used by Inform% -- fills the window with text.
  2384.  
  2385.  
  2386.  
  2387.  
  2388.           InputDate       InputDate Mo%, Dy%, Yr%, DtStr$, Row%, Col%, ExitCode%
  2389.             Accepts a valid date.  Unlike GetDate, InputDate only supports  the
  2390.             DD/MM/YYYY format and does not check for a mouse  button or the Alt
  2391.             key  being  pressed.   However,  the  input  is  formatted  whereas
  2392.             GetDate has all the numbers run together.
  2393.  
  2394.             Pass            ____
  2395.                  Mo%         Month number (1-12)
  2396.                              Zero for current month
  2397.                              -1 to skip month
  2398.  
  2399.                  Dy%         Day number (1-31)
  2400.                              Zero for current day
  2401.                              -1 to skip day
  2402.  
  2403.                  Yr%         Year number (4 digits)
  2404.                              Zero for current year
  2405.                              -1 to skip year
  2406.  
  2407.                  r%/c%       Screen row & column at which to display/get date
  2408.  
  2409.             Returns            _______
  2410.                  DtStr$      Date string formatted MM/DD/YYYY.
  2411.  
  2412.                  ExitCode%   Set to the key used to exit.
  2413.  
  2414.             Example 1            _________
  2415.                  M%=0: D%=0: Y%=0: row%=10: col%=20
  2416.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2417.  
  2418.                  This will  get the  date at location {10,20}  using the system
  2419.                  date as default.  Because InputDate is a BASIC subroutine,  it
  2420.                  is not necessary to initialize DtStr$ before using it.
  2421.  
  2422.             Example 2            _________
  2423.                  M%=5: D%=-1: Y%=0: row%=10: col%=20
  2424.                  InputDate M%, D%, Y%, DtStr$, row%, col%, ExitCode%
  2425.  
  2426.                  This will get a  month and year at location {10,20}  using May
  2427.                  and the system clock's year as default.
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.                                     ANGELIB for BC7/PDS                       37                                    ___________________
  2444.  
  2445.  
  2446.  
  2447.  
  2448.           IsColour%                                               x% = IsColour%
  2449.             Get adapter card type.
  2450.  
  2451.             Pass            ____
  2452.                  Nothing
  2453.  
  2454.             Returns            _______
  2455.                  True (-1) if colour adapter card, otherwise False (0).
  2456.  
  2457.  
  2458.  
  2459.  
  2460.           IsPath%                             stat% = IsPath%(Pathname$, InOut%)
  2461.             Checks validity  & extends  path.  If  directory is  being accessed
  2462.             for output and does not exist, user is prompted to create it.
  2463.  
  2464.             Pass            ____
  2465.                  TheName$    Path name in the format [d:][\path\]
  2466.                              If the drive or full path are  missing the current
  2467.                              drive/path are inserted
  2468.  
  2469.                  InOut%      1=Input/0=Output
  2470.                              If  directory does  not  exist  and InOut%=0  then
  2471.                              user will be prompted to create the directory
  2472.  
  2473.             Returns            _______
  2474.                  0 = Path not found/not created (suitable for Output)                                                              _
  2475.                  1 = Path exists (suitable for Input)                                               _
  2476.                  -1 = Bad path specification, or -2 = Other error
  2477.  
  2478.                  TheName$    Contains the  fully extended  path name  including
  2479.                              the drive  letter unless user  hit Esc when  asked
  2480.                              permission to create the directory.
  2481.  
  2482.             Example            _______
  2483.             Assume the current path is C:\ugh\ and no directories under it.
  2484.  
  2485.                  Path$ = "test": InOut% = 0
  2486.                  stat% = IsPath%(Path$, InOut%)
  2487.                  select case stat%
  2488.                       case 0    'Path not found & not created (user hit Esc)
  2489.                       case 1    'Path found, everything okay
  2490.                       case is < 0  'Bad path specification or DOS error
  2491.  
  2492.             Inform user that C:\ugh\test\  does not exist & ask to create.   If
  2493.             "No" stat%=0 & Path$="test", else stat%=1 & Path$="C:\ugh\test\"
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.                                     ANGELIB for BC7/PDS                       38                                    ___________________
  2510.  
  2511.  
  2512.  
  2513.  
  2514.           Max%                                           Highest% = Max%(A%, B%)
  2515.             Returns the larger of the two integers
  2516.  
  2517.  
  2518.  
  2519.  
  2520.           MaxL&                                         Highest& = MaxL&(A&, B&)
  2521.             Returns the larger of two long integers.
  2522.  
  2523.  
  2524.  
  2525.  
  2526.           MaxS!                                         Highest! = MaxS!(A!, B!)
  2527.             Returns the larger of two single-precision floating point numbers.
  2528.  
  2529.  
  2530.  
  2531.  
  2532.           Min%                                            Lowest% = Min%(A%, B%)
  2533.             Returns the smaller of two integers.
  2534.  
  2535.  
  2536.  
  2537.  
  2538.           MinL&                                          Lowest& = MinL&(A&, B&)
  2539.             Returns the smaller of two long integers.
  2540.  
  2541.  
  2542.  
  2543.  
  2544.           MinS!                                          Lowest! = MinS!(A!, B!)
  2545.             Returns the smaller of two single precision numbers.
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.                                     ANGELIB for BC7/PDS                       39                                    ___________________
  2576.  
  2577.  
  2578.  
  2579.  
  2580.           MonthDays%                                NoDays% = MonthDays%(M%, Y%)
  2581.             Returns the number of days in month M% of year Y%.
  2582.  
  2583.             Pass            ____
  2584.                  M%          Month (1-12)
  2585.                  Y%          Year (2 or 4 digits)
  2586.  
  2587.             Returns            _______
  2588.                  Number of days in the specified month
  2589.  
  2590.             Example            _______
  2591.                  MonthDays%(2,1992) returns 29
  2592.  
  2593.  
  2594.  
  2595.  
  2596.           OutDev$                                    PDev$ = OutDev$(Port%, ms%)
  2597.             Presents a menu of output devices: Screen, Printer, and Disk  File.
  2598.             If Disk  File is  selected the  user is  prompted for  a file  name
  2599.             (using  GetFileName$).   If Printer is selected  the routine checks
  2600.             if the printer is on-line (that's  partly why Port% is needed)  and
  2601.             returns the device  name as  "LPT1:", "LPT2:",  or "LPT3:"  (that's
  2602.             also why Port% is needed).
  2603.  
  2604.             Pass            ____
  2605.                  Port%       Port number of printer (1, 2, or 3)
  2606.  
  2607.                  ms%         Mouse support:  0=no, non-zero=yes
  2608.  
  2609.             Returns            _______
  2610.                  Device or file name
  2611.  
  2612.  
  2613.  
  2614.  
  2615.           OutDevs$                                  PDev$ = OutDevs$(Port%, ms%)
  2616.             Same  as   OutDev$  function,  but   for  use  with   ChooseFiles$,
  2617.             FileRestore2%, GetFileNames$, and SelectSoftFonts% routines.
  2618.  
  2619.             See OutDev$ function for details.
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.                                     ANGELIB for BC7/PDS                       40                                    ___________________
  2642.  
  2643.  
  2644.  
  2645.  
  2646.           ParseFSpec             ParseFSpec TheName$, Drv$, Pathname$, TheName2$
  2647.             Searches file name for the drive, path, and NAME.EXT components.
  2648.  
  2649.             Pass            ____
  2650.                  TheName$    Full file name to parse
  2651.  
  2652.             Returns            _______
  2653.                  Drv$        Drive letter followed by a colon (if present)
  2654.  
  2655.                  Pathname$   Path  name, if present,  beginning and ending with
  2656.                              a  foreslash  (\).  Path  will  be  extended  with
  2657.                              current path, if necessary.
  2658.  
  2659.                  TheName2$   FILENAME.EXT, if present
  2660.  
  2661.             Notes            _____
  2662.  
  2663.             Converts  the regular  slash (/) to  a foreslash (\),  in case user
  2664.             enters the wrong one.
  2665.  
  2666.             If an invalid  file name is entered  (for example, more  than eight
  2667.             characters  in  the  name  or more  than  three  characters in  the
  2668.             extension) then TheName2$ is returned as a blank string.
  2669.  
  2670.             The original file  name, TheName$, is not changed  so that if there
  2671.             is an error it can be given to the user for editing again.
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.                                     ANGELIB for BC7/PDS                       41                                    ___________________
  2708.  
  2709.  
  2710.  
  2711.  
  2712.           PctDone                         PctDone PctY%, PctX%, Percent%, title$
  2713.             Displays  a graph of percentage completion  in a box on the screen.
  2714.             If the  process takes  longer than  10 seconds  a count-down  timer
  2715.             will appear below the graph.
  2716.  
  2717.             Pass            ____
  2718.                  PctY%       The row (Y position) of the top right corner
  2719.  
  2720.                  PctX%       The column (X position) of the top right corner
  2721.  
  2722.                  Percent%    Percentage  to draw on  the graph.  The first time
  2723.                              PctDone is called  a small window  is drawn.  When
  2724.                              Percent% is 100 the window is erased.
  2725.  
  2726.                  title$      A  title  (10  chars  max)  to  display  over  the
  2727.                              progress bar. The length  of the title  determines
  2728.                              the width of the window.
  2729.  
  2730.             Returns            _______
  2731.                  Nothing
  2732.  
  2733.             Notes            _____
  2734.  
  2735.             You must call PctDone  with 100 to clear  it.   If you do not,  the
  2736.             window will not be displayed until the routine is cleared.
  2737.  
  2738.             Example            _______
  2739.                  For Sort&=0 to NumRecs&
  2740.                      PctDone 9, 30, 100 * Sort& \ Y&, "Sorting"
  2741.                      do something...
  2742.                      next Sort&
  2743.  
  2744.  
  2745.  
  2746.  
  2747.           PrintRptMsg                                           PrintRptMsg Msg$
  2748.             Displays a window  saying "Printing "+Rpt$+" Press Esc to  cancel."
  2749.             I use this on every report so I made it into a routine.
  2750.  
  2751.             Example            _______
  2752.                  Rpt$ = "Stock Status Report"
  2753.                  PrintRptMsg Rpt$
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.                                     ANGELIB for BC7/PDS                       42                                    ___________________
  2774.  
  2775.  
  2776.  
  2777.  
  2778.           PtrReady%                                       ok% = PtrReady%(Port%)
  2779.             Checks if printer on LPT[Port%] is on-line.
  2780.  
  2781.             Pass            ____
  2782.                  Port%       Printer port (1, 2, or 3)
  2783.  
  2784.             Returns            _______
  2785.                  TRUE if ready, FALSE if not
  2786.  
  2787.             Notes            _____
  2788.                  It doesn't matter whether or not you  have opened a channel to
  2789.                  the printer before calling this routine.
  2790.  
  2791.  
  2792.  
  2793.  
  2794.           QSort    QSort Wrk%(), Arr1$(), Arr2$(), NoDims%, NoItems%, SortField%
  2795.             A good public domain sorting  method.  Used by ChooseFile$ to  sort
  2796.             the file list.
  2797.  
  2798.             See  the source code in QSORT.SUB.  This is  not my code -- I'm not
  2799.             selling it, I just use it and pass it on to you...
  2800.  
  2801.  
  2802.  
  2803.  
  2804.           Repl$                                cmd$ = Repl$(St$, Target$, Item$)
  2805.             Replaces occurence of  Target$ in St$ with  Item$.  Good for  laser
  2806.             printer codes.
  2807.  
  2808.             Pass            ____
  2809.                  St$         Complete string
  2810.  
  2811.                  Target$     The part of St$ to be replaced
  2812.  
  2813.                  Item$       The replacement for Target$
  2814.  
  2815.             Returns            _______
  2816.                  The modified string with trailing spaces & nulls truncated.
  2817.  
  2818.             Example            _______
  2819.                  Repl$("&a#V ","#","500") will return "&a500V"
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.                                     ANGELIB for BC7/PDS                       43                                    ___________________
  2840.  
  2841.  
  2842.  
  2843.  
  2844.           SayOk                                            SayOk Row%, Col%, ms%
  2845.             Puts an "Ok" button centred at position {Row%, Col%} and an  "Enter
  2846.             /  Continue" message at the  bottom of the screen, flushes keyboard
  2847.             buffer, then waits for mouse or keyboard to exit.
  2848.  
  2849.             Pass            ____
  2850.                  Row%        Row on which to place button
  2851.                  Col%        Middle of button
  2852.                  ms%         Use mouse support? (True/False)
  2853.  
  2854.             Returns            _______
  2855.                  Nothing
  2856.  
  2857.             Notes            _____
  2858.                  Scans screen at  {Row%-1, Col%} and inverts the colours  found
  2859.             there -- the idea  being to make the button stand out from the lines
  2860.             above it.
  2861.                  If  ms% is non-zero (True)  then the mouse must be initialized
  2862.             but invisible.
  2863.  
  2864.  
  2865.  
  2866.  
  2867.           SearchPath$                                a$ = SearchPath$(FileName$)
  2868.             Searches the DOS PATH environment variable for a file.
  2869.  
  2870.             Pass            ____
  2871.                  FileName$   Name of file for which to search  (file name only;
  2872.                              no drive or path)
  2873.  
  2874.             Returns            _______
  2875.                  If file is found, DOS path with trailing foreslash (\)
  2876.                  If file is not found, returns blank string ("")
  2877.  
  2878.             Example            _______
  2879.                  Assuming you have C:\ in your search path...
  2880.  
  2881.                  A$ = SearchPath$("Config.sys")
  2882.  
  2883.                  will set A$ = "C:\"
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.                                     ANGELIB for BC7/PDS                       44                                    ___________________
  2906.  
  2907.  
  2908.  
  2909.  
  2910.           SelectFont%    ok% = SelectFont%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  2911.             Displays  a scrollable list of soft fonts in a window and waits for
  2912.             user to select  one or press Esc.   List  will show DOS file  name,
  2913.             font  name (if present  in header)  and point  size (if  present in
  2914.             header).
  2915.  
  2916.             Pass            ____
  2917.                  m$          Purpose  of  font,  displayed  at  top  of  window
  2918.                              (e.g., "Printing", "Reports", "Titles", etc.)
  2919.  
  2920.                  path$       File  specification  for  PRINTER.DAT file.  path$
  2921.                              may contain a  drive, path, and/or  file name.  If
  2922.                              no file  name is given,  PRINTER.DAT is  used.  If
  2923.                              no drive  & path are  given, the  current drive  &
  2924.                              path are used.
  2925.  
  2926.                  PtrNo%      The printer's record number in PRINTER.DAT
  2927.  
  2928.                  Ext$        Soft  font   file  extension   (e.g.,  "SFP"   for
  2929.                              portrait fonts, "SFL" for landscape fonts)
  2930.  
  2931.                  SFdir$      Default soft font directory (e.g., "C:\Fonts")
  2932.  
  2933.                  ms%         Mouse support:  0=no mouse, 1=use mouse
  2934.  
  2935.             Returns            _______
  2936.                  Function returns font's  record number in PRINTER.DAT or  zero
  2937.                  if user presses Esc
  2938.  
  2939.                  m$          Changed  to soft font  file name  (including path)
  2940.                              if soft font selected
  2941.  
  2942.                  Pts%        Changed to point size if scalable font
  2943.  
  2944.                  SFdir$      Soft font directory with any user modifications
  2945.  
  2946.             Notes            _____
  2947.                  Mouse must be initialized but turned OFF
  2948.  
  2949.  
  2950.  
  2951.  
  2952.           SelectFonts%  ok% = SelectFonts%(m$,path$,PtrNo%,Pts%,Ext$,SFdir$,ms%)
  2953.             Same as SelectFont%()  function except that it uses  ChooseFileS$()
  2954.             (instead of ChooseFile$()).
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.                                     ANGELIB for BC7/PDS                       45                                    ___________________
  2972.  
  2973.  
  2974.  
  2975.  
  2976.           SelectFontSize%             Pts% = SelectFontSize%(Font$, IsPts%, ms%)
  2977.             This routine  gets the  user's choice  for font  size in a  window.
  2978.             This routine  is called  whenever a  scalable font  is selected  in
  2979.             SelectFont% (I don't ever use this routine directly).
  2980.  
  2981.             Pass            ____
  2982.                  Font$       The font  name  (for  displaying on  the  screen).
  2983.                              For example, CG Times.
  2984.  
  2985.                  IsPts%      Logical  flag  to indicate  whether point  size is
  2986.                              needed  (versus   character  pitch).     If   true
  2987.                              "points"  is   displayed;   otherwise  (if   zero)
  2988.                              "character pitch" is displayed on screen.
  2989.  
  2990.                  ms%         Mouse flag: 0=no mouse, 1=use mouse
  2991.  
  2992.             Returns            _______
  2993.                  Font size (integer) or zero if user presses Esc.
  2994.  
  2995.             Notes            _____
  2996.                  This  routine  is  called  by  SelectFont%.    Mouse  must  be
  2997.             initialized but turned OFF (invisible cursor).
  2998.  
  2999.  
  3000.  
  3001.  
  3002.           SelectSoftFont$              Font$ = SelectSoftFont$(Path$, Ext$, ms%)
  3003.             This routine presents a scrollable list of soft fonts  in a window.
  3004.             It  is called by  SelectFont% if  the user selects  a soft font (as
  3005.             opposed to a font built into the printer).
  3006.  
  3007.             Pass            ____
  3008.                  Path$       Path to soft fonts
  3009.  
  3010.                  Ext$        Extension to be included in the  list (e.g., "SFP"
  3011.                              for portrait fonts)
  3012.  
  3013.                  ms%         Mouse support (0=no, 1=yes)
  3014.  
  3015.             Returns            _______
  3016.                  Name of chosen font, including drive & path, if necessary.
  3017.  
  3018.                  Path$       Path as modified by user
  3019.  
  3020.             Notes            _____
  3021.                  Uses ChooseFile$() function
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.                                     ANGELIB for BC7/PDS                       46                                    ___________________
  3038.  
  3039.  
  3040.  
  3041.  
  3042.           SelectSoftFonts$            Font$ = SelectSoftFonts$(Path$, Ext$, ms%)
  3043.             Same as SelectSoftFont$() except  this routine uses  ChooseFileS$()
  3044.             instead of ChooseFile$().
  3045.  
  3046.  
  3047.  
  3048.  
  3049.           StrFmt$                            ph$ = StrFmt$(Mask$, St$, reverse%)
  3050.             Formats a  string according to a given mask.  I  use this to format
  3051.             phone numbers, zip codes, etc.
  3052.  
  3053.             Pass            ____
  3054.                  Mask$       Mask: "#"  is a digit  or a space; "9"  is a digit
  3055.                              or  a  zero;  "*"  is  a  digit  or  an  asterisk;
  3056.                              everything else is treated as a literal
  3057.                  St$         String to format
  3058.                  reverse%    Flag: if  TRUE formatting  is done  from right  to
  3059.                              left; if  FALSE (0) formatting  is done from  left
  3060.                              to right. TRUE is the most common setting.
  3061.  
  3062.             Returns            _______
  3063.                  Formatted string
  3064.  
  3065.             Examples            ________
  3066.                  a$ = StrFmt$("8052662574","(###) ###-####",-1)
  3067.                  returns a$ = "(805) 266-2574"
  3068.  
  3069.                  a$ = StrFmt$("2726893","(###) ###-####",-1)
  3070.                  returns a$ = "(   ) 272-6893"
  3071.  
  3072.                  a$ = StrFmt$("$*****","15",-1)
  3073.                  returns a$ = "$***15"
  3074.  
  3075.  
  3076.  
  3077.  
  3078.           StripSymbols$                               new$ = StripSymbols$(Old$)
  3079.             This  strips  any symbols  from  a  string, returning  numbers  and
  3080.             letters only.  I  use it to strip the parenthesis, etc.  from phone
  3081.             numbers, etc.  Returns the string St$ stripped of its  parenthesis,
  3082.             dashes, and commas.
  3083.  
  3084.             Example            _______
  3085.                  a$ = StripSymbols$("(805) 272-4923")
  3086.  
  3087.                  returns a$ = "8052724923"
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.                                     ANGELIB for BC7/PDS                       47                                    ___________________
  3104.  
  3105.  
  3106.  
  3107.  
  3108.           Trim$                                                   b$ = Trim$(a$)
  3109.             Trims  leading  & trailing  spaces  and trailing  chr$(0)'s from  a
  3110.             string  (using LTRIM$/RTRIM$ will remove  spaces but not nulls).  I
  3111.             use this to  test the length  of static  strings, which are  padded
  3112.             with CHR$(0)'s.
  3113.  
  3114.  
  3115.  
  3116.  
  3117.           ZipFmt$                                          a$ = ZipFmt$(TheZip$)
  3118.             Formats a zip code.
  3119.  
  3120.             Pass            ____
  3121.                  TheZip$     Unformatted Zip/Postal code
  3122.  
  3123.             Returns            _______
  3124.                  Zip/postal code formatted as follows:
  3125.                  * If all numbers, #####-#######
  3126.                  * If len 4 or 5 -- A#A #A#
  3127.                  * Other -- No formatting
  3128.  
  3129.  
  3130.  
  3131.  
  3132.           zTrim$                                                 b$ = zTrim$(a$)
  3133.             This routine only trims  trailing nulls [chr$(0)]  from the string.
  3134.             Good for trimming  fixed-length file fields  which are  padded with
  3135.             nulls when you don't want to remove any spaces  [chr$(32)] from the
  3136.             string.
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.                                     ANGELIB for BC7/PDS                       48                                    ___________________
  3170.  
  3171.  
  3172.  
  3173.  
  3174.           XII. USING PRINTER FUNCTIONS
  3175.  
  3176.                In order to use the printer functions, you will need to include
  3177.           the data structures definition file PtrRec.DEF in your source code. 
  3178.           Place the line '$INCLUDE: 'PtrRec.DEF' near the beginning of your
  3179.           code.
  3180.  
  3181.                Next, you will need to dimension the variables to hold the
  3182.           records.  I use both local and the global (common) variables; either
  3183.           will work fine unless your programme is strapped for memory one way or
  3184.           the other.  For local variables use DIM; to make the variables global
  3185.           use DIM SHARED.  The record types are:
  3186.  
  3187.                LaserPtrRec - Control codes which are not font-specific
  3188.                LaserFontRec - Font-specific control codes
  3189.                DMPtrRec - Dot matrix codes which are not font-specific
  3190.                DMFontRec - Font-specific dot matrix control codes
  3191.  
  3192.                The records are all the same length so that the single file,
  3193.           PRINTER.DAT, can contain all four record types.  Laser printer records
  3194.           start with a greater-than (>) sign (for example, ">Panasonic KX-
  3195.           P4450").  Dot matrix printer records start with a dot (for example,
  3196.           ".NEC P5300").  Both record types (dot matrix and laser) begin with a
  3197.           Model field, so you can use a LaserPtrRec variable to read a dot
  3198.           matrix record, then, if the Model begins with a period, re-read the
  3199.           record as a DMPtrRec variable.
  3200.  
  3201.                Here are the steps your programme will need to take to set
  3202.           everything up:
  3203.                1.  Use the ChoosePtr% function to get and save the user's
  3204.                    choice for a printer
  3205.                2.  Use SelectFont% to get the user's font choice(s).
  3206.                3.  Save printer & font choices in a configuration file.
  3207.                4.  Either at programme start-up or before printing read the
  3208.                    printer control codes into memory.  For example:
  3209.  
  3210.                    DIM SHARED Lz as LaserPtrRec
  3211.                    DIM SHARED DM as DMPtrRec
  3212.                    PtrFile% = FREEFILE
  3213.                    OPEN HomePath$ + "Printer.DAT" FOR RANDOM ACCESS READ SHARED
  3214.                        AS PtrFile% LEN = LEN(Lz)
  3215.                    GET #PtrFile%, PtrRec%, Lz
  3216.                    IF LEFT$(Lz.Model, 1) = "." THEN
  3217.                      GET #PtrFile%, PtrRec%, DM
  3218.                      END IF
  3219.  
  3220.                5.  At programme start-up or before printing read the printer
  3221.                    font codes into memory (like the example below)
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.                                     ANGELIB for BC7/PDS                       49                                    ___________________
  3236.  
  3237.  
  3238.  
  3239.  
  3240.           DIM LF as LaserFontRec
  3241.           DIM DF as DMFontRec
  3242.           ' Normally you would already have PtrFile% open from the
  3243.           ' above routine (to read the printer codes).  If not, you
  3244.           ' would need to open the file as in the above routine.
  3245.           m$ = "Reports": Ext$ = "SFP"                     'Portrait fonts (SFP)
  3246.           FontRec%=SelectFont%(m$, PtrRec%, Pts%, Ext$, SFdir$, ms%)
  3247.           SELECT CASE FontRec%                                     'Check result
  3248.                CASE 0                                       'User hit Escape key
  3249.                  EXIT SUB
  3250.                CASE -1                                     'User chose soft font
  3251.                  PRINT #PrintFile%, zTrim$(Lz.Init);                'Reset laser
  3252.                  Done% = FontDL(SFont$, FPts%, PtrPort%, 400)     'Download font
  3253.                  IF NOT Done% THEN                             'User aborted download; flag routine as 'cancelled'
  3254.                    EXIT FUNCTION or SUB
  3255.                    END IF
  3256.                  IF FPts% > 0 THEN                           'FontDL got a size?
  3257.                      Fcpi% = 120 \ FPts%      'Cvt points to rough CPI for calcs
  3258.                    ELSE                                     'No size in font hdr
  3259.                      Fcpi% = 10                     'Assume 12pt/10cpi for calcs
  3260.                    END IF
  3261.                  PRINT #PrintFile%, CHR$(27); ")400X";       'Secondary, ID #400
  3262.                CASE ELSE
  3263.                  IF Ptr$ = "D" THEN                          'DOT MATRIX PRINTER
  3264.                      GET #PtrFile%, FontRec%, DF
  3265.                      PRINT #PrintFile%, zTrim$(DM.Init);                  'Reset
  3266.                      PRINT #PrintFile%, zTrim$(DF.Select);          'Select font
  3267.                      T$=Trim$(DM.HTab) + CHR$(2 * Fcpi) + CHR$(0)  'Set tab @ 2"
  3268.  
  3269.                    ELSE                                           'LASER PRINTER
  3270.                      GET #PtrFile%, FontRec%, LF
  3271.                      PRINT #PrintFile%, zTrim$(LF.SymSet2);      'Make secondary
  3272.                      PRINT #PrintFile%, zTrim$(LF.Select2);     'Use SymSet1 etc
  3273.                      PRINT #PrintFile%, zTrim$(LF.Spacing);     'to make Primary
  3274.                      IF VAL(LF.Pitch) = 0 THEN                   'Scalable font?
  3275.                        PRINT #PrintFile%,LTRIM$(STR$(Pts%));         'Point size
  3276.                        END IF                                '(from SelectFont%)
  3277.                      PRINT #PrintFile%, zTrim$(LF.Pitch);      'Pitch select cmd
  3278.                      PRINT #PrintFile%, zTrim$(LF.Slant);        'Upright/italic
  3279.                      PRINT #PrintFile%, zTrim$(LF.Weight);       'Light/Med/Bold
  3280.                      PRINT #PrintFile%, zTrim$(LF.Number);      'PCL font number
  3281.                      IF RIGHT$(zTrim$(LF.Pitch), 1) = "h" THEN     'Mono-spaced?
  3282.                          Fcpi% = VAL(LF.Pitch)                        'Store cpi
  3283.                          FPts% = 120 \ temp1%       'Cvt cpi to rough pts if nec
  3284.                        ELSE
  3285.                          FPts% = VAL(LF.Pitch)                     'Store points
  3286.                          Fcpi% = 120 \ TPts%        'Cvt pts to rough cpi if nec
  3287.                        END IF
  3288.                    END IF
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.                                     ANGELIB for BC7/PDS                       50                                    ___________________
  3302.  
  3303.  
  3304.  
  3305.  
  3306.                END SELECT
  3307.           CLOSE #PtrFile%
  3308.  
  3309.                Now you have the printer ready to go and you have the variables
  3310.           Fcpi% and Fpts% to work with in calculating TAB locations, line
  3311.           length, etc.
  3312.  
  3313.                You will notice that I use zTrim$() rather than just printing a
  3314.           variable.  This is because BASIC pads TYPE fields with nulls -
  3315.           CHR$(0)'s.  The zTrim$() function removes CHR$(0)'s but leaves
  3316.           trailing spaces (which may be part of the command string).
  3317.  
  3318.                There are some things that you must know, such as that the pitch
  3319.           command for a PCL (laser) printer ends in "h" if it is mono-spaced
  3320.           (cpi) and "v" if it is proportionally-spaced (points).  Also, in
  3321.           setting a TAB string in the above example I used the Epson-standard
  3322.           which terminates the setting of TABs with a CHR$(0).  This is the best
  3323.           solution I have come up with, and every printer I've seen in the past
  3324.           five years uses Epson codes anyhow, so I figure this technique will
  3325.           work 90% of the time or better.
  3326.  
  3327.                You can make your own PRINTER.DAT file or modify the one supplied
  3328.           just by using the PtrRec.DEF file.  Someday soon I will make a
  3329.           programme for modifying the PRINTER.DAT file, but for now it will have
  3330.           to be done manually.  I would really appreciate it if you would share
  3331.           with me any new printers you install by sending me your modified
  3332.           PRINTER.DAT file.
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.